/**
 * 
 */
package xj.toolkit.fsm.event;

import java.util.UUID;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import xj.toolkit.util.Identifier;
import xj.toolkit.util.MutableIdentifyable;
import xj.toolkit.util.UUIDIdentifier;

/**
 * @author hp
 *
 */
public class UUIDTimeoutEvent implements MutableIdentifyable<UUID>, TimeoutEvent {

	private Identifier<UUID> identifier = new UUIDIdentifier();
	private int stamp;

	public UUIDTimeoutEvent(UUIDIdentifier id) {
		this.stamp = 0;
		this.setIdentification(id);
	}

	public int getStamp() {
		return this.stamp;
	}

	public void setStamp(int stamp) {
		this.stamp = stamp;
	}

	public String toString() {

		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

	@Override
	public Identifier<UUID> getIdentification() {
		return identifier;
	}

	@Override
	public void setIdentification(Identifier<UUID> id) {
		this.identifier = id;
	}
}
